package com.bbx.taxi.client.Bean;

import com.yanxuwen.PinnedHeader.IndexBar.bean.BaseIndexPinyinBean;

import java.util.List;

/**
 * 作者：严旭文 on 2016/12/21 15:28
 * 邮箱：420255048@qq.com
 * 获取线路
 */
public class Line {

    /**
     * status : 0
     * message : OK
     * version : 1
     * cities : {"app_citys":[{"child_citys":[{"city":"福建省漳州市","code":"362000","is_city":"0","is_detail":"0","is_new":"0","name":"泉州市","to_cities":[{"child_citys":[{"city":"福建省漳州市","code":"361000","incity_phone":"","incity_type":"1","is_detail":"0","is_incity":"0","is_new":"0","is_show":"0","line_id":"362000_to_361000","line_name":"泉州至厦门","name":"厦门市","service_phone":"968856"}],"city":"福建省漳州市","code":"361000","name":"厦门市","province":"福建省"}]},{"city":"福建省泉州市","code":"362200","is_city":"0","is_detail":"0","is_new":"0","name":"晋江市","to_cities":[{"child_citys":[{"city":"福建省漳州市","code":"362000","incity_phone":"","incity_type":"1","is_detail":"0","is_incity":"0","is_new":"0","is_show":"0","line_id":"362200_to_362000","line_name":"晋江至泉州","name":"泉州市","service_phone":"968969"}],"city":"福建省漳州市","code":"362000","name":"泉州市","province":"福建省"}]},{"city":"福建省泉州市","code":"362300","is_city":"0","is_detail":"0","is_new":"1","name":"南安市","to_cities":[{"child_citys":[{"city":"福建省漳州市","code":"362000","incity_phone":"","incity_type":"1","is_detail":"0","is_incity":"0","is_new":"0","is_show":"0","line_id":"362300_to_362000","line_name":"南安至泉州","name":"泉州市","service_phone":"968969"}],"city":"福建省漳州市","code":"362000","name":"泉州市","province":"福建省"}]}],"city":"福建省漳州市","code":"362000","name":"泉州市","province":"福建省"}],"app_code":"10001","app_interface":0,"app_name":"帮邦行"}
     */
    private int version;
    private CitiesBean cities;

    public int getVersion() {
        return version;
    }

    public void setVersion(int version) {
        this.version = version;
    }

    public CitiesBean getCities() {
        return cities;
    }

    public void setCities(CitiesBean cities) {
        this.cities = cities;
    }

    public static class CitiesBean {
        /**
         * app_citys : [{"child_citys":[{"city":"福建省漳州市","code":"362000","is_city":"0","is_detail":"0","is_new":"0","name":"泉州市","to_cities":[{"child_citys":[{"city":"福建省漳州市","code":"361000","incity_phone":"","incity_type":"1","is_detail":"0","is_incity":"0","is_new":"0","is_show":"0","line_id":"362000_to_361000","line_name":"泉州至厦门","name":"厦门市","service_phone":"968856"}],"city":"福建省漳州市","code":"361000","name":"厦门市","province":"福建省"}]},{"city":"福建省泉州市","code":"362200","is_city":"0","is_detail":"0","is_new":"0","name":"晋江市","to_cities":[{"child_citys":[{"city":"福建省漳州市","code":"362000","incity_phone":"","incity_type":"1","is_detail":"0","is_incity":"0","is_new":"0","is_show":"0","line_id":"362200_to_362000","line_name":"晋江至泉州","name":"泉州市","service_phone":"968969"}],"city":"福建省漳州市","code":"362000","name":"泉州市","province":"福建省"}]},{"city":"福建省泉州市","code":"362300","is_city":"0","is_detail":"0","is_new":"1","name":"南安市","to_cities":[{"child_citys":[{"city":"福建省漳州市","code":"362000","incity_phone":"","incity_type":"1","is_detail":"0","is_incity":"0","is_new":"0","is_show":"0","line_id":"362300_to_362000","line_name":"南安至泉州","name":"泉州市","service_phone":"968969"}],"city":"福建省漳州市","code":"362000","name":"泉州市","province":"福建省"}]}],"city":"福建省漳州市","code":"362000","name":"泉州市","province":"福建省"}]
         * app_code : 10001
         * app_interface : 0
         * app_name : 帮邦行
         */

        private String app_code;
        private int app_interface;
        private String app_name;
        private List<AppCitysBean> app_citys;

        public String getApp_code() {
            return app_code;
        }

        public void setApp_code(String app_code) {
            this.app_code = app_code;
        }

        public int getApp_interface() {
            return app_interface;
        }

        public void setApp_interface(int app_interface) {
            this.app_interface = app_interface;
        }

        public String getApp_name() {
            return app_name;
        }

        public void setApp_name(String app_name) {
            this.app_name = app_name;
        }

        public List<AppCitysBean> getApp_citys() {
            return app_citys;
        }

        public void setApp_citys(List<AppCitysBean> app_citys) {
            this.app_citys = app_citys;
        }

        /**
         * 出发地父类，如厦门市
         */
        public static class AppCitysBean extends BaseIndexPinyinBean {
            /**
             * child_citys : [{"city":"福建省漳州市","code":"362000","is_city":"0","is_detail":"0","is_new":"0","name":"泉州市","to_cities":[{"child_citys":[{"city":"福建省漳州市","code":"361000","incity_phone":"","incity_type":"1","is_detail":"0","is_incity":"0","is_new":"0","is_show":"0","line_id":"362000_to_361000","line_name":"泉州至厦门","name":"厦门市","service_phone":"968856"}],"city":"福建省漳州市","code":"361000","name":"厦门市","province":"福建省"}]},{"city":"福建省泉州市","code":"362200","is_city":"0","is_detail":"0","is_new":"0","name":"晋江市","to_cities":[{"child_citys":[{"city":"福建省漳州市","code":"362000","incity_phone":"","incity_type":"1","is_detail":"0","is_incity":"0","is_new":"0","is_show":"0","line_id":"362200_to_362000","line_name":"晋江至泉州","name":"泉州市","service_phone":"968969"}],"city":"福建省漳州市","code":"362000","name":"泉州市","province":"福建省"}]},{"city":"福建省泉州市","code":"362300","is_city":"0","is_detail":"0","is_new":"1","name":"南安市","to_cities":[{"child_citys":[{"city":"福建省漳州市","code":"362000","incity_phone":"","incity_type":"1","is_detail":"0","is_incity":"0","is_new":"0","is_show":"0","line_id":"362300_to_362000","line_name":"南安至泉州","name":"泉州市","service_phone":"968969"}],"city":"福建省漳州市","code":"362000","name":"泉州市","province":"福建省"}]}]
             * city : 福建省漳州市
             * code : 362000
             * name : 泉州市
             * province : 福建省
             */

            private String city;
            private String code;
            private String name;
            private String province;
            private boolean isSn;
            private boolean ishistoric=false;//判断是否是历史城市
            private List<ChildCitysBeanX> child_citys;

            public String getCity() {
                return city;
            }

            public void setCity(String city) {
                this.city = city;
            }

            public String getCode() {
                return code;
            }

            public void setCode(String code) {
                this.code = code;
            }

            public String getName() {
                return name;
            }

            public void setName(String name) {
                this.name = name;
            }

            public String getProvince() {
                return province;
            }

            public void setProvince(String province) {
                this.province = province;
            }

            public List<ChildCitysBeanX> getChild_citys() {
                return child_citys;
            }

            public void setChild_citys(List<ChildCitysBeanX> child_citys) {
                this.child_citys = child_citys;
            }
            /**
             * 判断是否是是历史城市
             */
            public void setIsHistoric(boolean ishistoric){
                this.ishistoric=ishistoric;
            }
            /**
             * 判断是否是是历史城市
             */
            public boolean getIsHistoric(){
                return  ishistoric;
            }

            /**
             * 判断是否是市内
             */
            public void setIsSn(boolean isSn){
                this.isSn=isSn;
            }
            /**
             * 判断是否是市内
             */
            public boolean getisSn(){
                return  isSn;
            }
            @Override
            public String getTarget() {
                return getIsHistoric()?"历史出行城市":(getisSn()?city:"已开通城市");
            }

            @Override
            public boolean isNeedToPinyin() {
                return isSn;
            }

            public String getIndexString(){
                return getIsHistoric()?"历史":null;
            }

            @Override
            public boolean isShowSuspension() {
                return true;
            }

            /**
             * 出发地子类，如厦门市里面的，，思明区跟湖里区
            */
            public static class ChildCitysBeanX {
                /**
                 * city : 福建省漳州市
                 * code : 362000
                 * is_city : 0
                 * is_detail : 0
                 * is_new : 0
                 * name : 泉州市
                 * to_cities : [{"child_citys":[{"city":"福建省漳州市","code":"361000","incity_phone":"","incity_type":"1","is_detail":"0","is_incity":"0","is_new":"0","is_show":"0","line_id":"362000_to_361000","line_name":"泉州至厦门","name":"厦门市","service_phone":"968856"}],"city":"福建省漳州市","code":"361000","name":"厦门市","province":"福建省"}]
                 */

                private String city;
                private String code;
                private String is_city;
                private String is_show;
                private String is_detail;
                private String is_new;
                private String name;
                private List<ToCitiesBean> to_cities;

                public String getCity() {
                    return city;
                }

                public void setCity(String city) {
                    this.city = city;
                }

                public String getCode() {
                    return code;
                }

                public void setCode(String code) {
                    this.code = code;
                }

                public String getIs_city() {
                    return is_city;
                }

                public void setIs_city(String is_city) {
                    this.is_city = is_city;
                }

                public String getIs_show() {
                    return is_show;
                }

                public void setIs_show(String is_show) {
                    this.is_show = is_show;
                }

                public String getIs_detail() {
                    return is_detail;
                }

                public void setIs_detail(String is_detail) {
                    this.is_detail = is_detail;
                }

                public String getIs_new() {
                    return is_new;
                }

                public void setIs_new(String is_new) {
                    this.is_new = is_new;
                }

                public String getName() {
                    return name;
                }

                public void setName(String name) {
                    this.name = name;
                }

                public List<ToCitiesBean> getTo_cities() {
                    return to_cities;
                }

                public void setTo_cities(List<ToCitiesBean> to_cities) {
                    this.to_cities = to_cities;
                }

                /**
                 * 目的地，父类，如厦门市
                 */
                public static class ToCitiesBean extends BaseIndexPinyinBean{
                    /**
                     * child_citys : [{"city":"福建省漳州市","code":"361000","incity_phone":"","incity_type":"1","is_detail":"0","is_incity":"0","is_new":"0","is_show":"0","line_id":"362000_to_361000","line_name":"泉州至厦门","name":"厦门市","service_phone":"968856"}]
                     * city : 福建省漳州市
                     * code : 361000
                     * name : 厦门市
                     * province : 福建省
                     */

                    private String city;
                    private String code;
                    private String name;
                    private String province;
                    private boolean isSn;
                    private boolean ishistoric=false;
                    private List<ChildCitysBean> child_citys;

                    public String getCity() {
                        return city;
                    }

                    public void setCity(String city) {
                        this.city = city;
                    }

                    public String getCode() {
                        return code;
                    }

                    public void setCode(String code) {
                        this.code = code;
                    }

                    public String getName() {
                        return name;
                    }

                    public void setName(String name) {
                        this.name = name;
                    }

                    public String getProvince() {
                        return province;
                    }

                    public void setProvince(String province) {
                        this.province = province;
                    }

                    public List<ChildCitysBean> getChild_citys() {
                        return child_citys;
                    }

                    public void setChild_citys(List<ChildCitysBean> child_citys) {
                        this.child_citys = child_citys;
                    }

                    /**
                     * 判断是否是市内
                     */
                    public void setIsSn(boolean isSn){
                        this.isSn=isSn;
                    }
                    /**
                     * 判断是否是市内
                     */
                    public boolean getisSn(){
                        return  isSn;
                    }
                    /**
                     * 判断是否是是历史城市
                     */
                    public void setIsHistoric(boolean ishistoric){
                        this.ishistoric=ishistoric;
                    }
                    /**
                     * 判断是否是是历史城市
                     */
                    public boolean getIsHistoric(){
                        return  ishistoric;
                    }
                    @Override
                    public String getTarget() {
                        return getIsHistoric()?"历史出行城市":(getisSn()?city:"已开通城市");
                    }

                    @Override
                    public boolean isNeedToPinyin() {
                        return getIsHistoric()?false:isSn;
                    }
                    public String getIndexString(){
                        return getIsHistoric()?"历史":null;
                    }


                    @Override
                    public boolean isShowSuspension() {
                        return true;
                    }
                    /**
                     * 目的地子类，如厦门市里面的，，思明区跟湖里区
                     */
                    public static class ChildCitysBean {
                        /**
                         * city : 福建省漳州市
                         * code : 361000
                         * incity_phone :
                         * incity_type : 1
                         * is_detail : 0
                         * is_incity : 0
                         * is_new : 0
                         * is_show : 0
                         * line_id : 362000_to_361000
                         * line_name : 泉州至厦门
                         * name : 厦门市
                         * service_phone : 968856
                         */

                        private String city;
                        private String code;
                        private String incity_phone;
                        private String incity_type;
                        private String is_detail;
                        private String is_incity;
                        private String is_new;
                        private String is_show;
                        private String line_id;
                        private String line_name;
                        private String name;
                        private String service_phone;
                        private boolean isSn;

                        public String getCity() {
                            return city;
                        }

                        public void setCity(String city) {
                            this.city = city;
                        }

                        public String getCode() {
                            return code;
                        }

                        public void setCode(String code) {
                            this.code = code;
                        }

                        public String getIncity_phone() {
                            return incity_phone;
                        }

                        public void setIncity_phone(String incity_phone) {
                            this.incity_phone = incity_phone;
                        }

                        public String getIncity_type() {
                            return incity_type;
                        }

                        public void setIncity_type(String incity_type) {
                            this.incity_type = incity_type;
                        }

                        public String getIs_detail() {
                            return is_detail;
                        }

                        public void setIs_detail(String is_detail) {
                            this.is_detail = is_detail;
                        }

                        public String getIs_incity() {
                            return is_incity;
                        }

                        public void setIs_incity(String is_incity) {
                            this.is_incity = is_incity;
                        }

                        public String getIs_new() {
                            return is_new;
                        }

                        public void setIs_new(String is_new) {
                            this.is_new = is_new;
                        }

                        public String getIs_show() {
                            return is_show;
                        }

                        public void setIs_show(String is_show) {
                            this.is_show = is_show;
                        }

                        public String getLine_id() {
                            return line_id;
                        }

                        public void setLine_id(String line_id) {
                            this.line_id = line_id;
                        }

                        public String getLine_name() {
                            return line_name;
                        }

                        public void setLine_name(String line_name) {
                            this.line_name = line_name;
                        }

                        public String getName() {
                            return name;
                        }

                        public void setName(String name) {
                            this.name = name;
                        }

                        public String getService_phone() {
                            return service_phone;
                        }

                        public void setService_phone(String service_phone) {
                            this.service_phone = service_phone;
                        }
                        /**
                         * 判断是否是市内
                         */
                        public void setIsSn(boolean isSn){
                            this.isSn=isSn;
                        }
                        public boolean getisSn(){
                            return  isSn;
                        }
                    }
                }
            }
        }
    }
}

